package xyz.xpman.prisonerfitness.kit;

import android.content.Context;
import android.net.Uri;

import androidx.core.content.FileProvider;

import org.jetbrains.annotations.NotNull;

import java.io.File;

public class FileProviderKit {

    private FileProviderKit() { }


    public static Uri by(@NotNull Context context, @NotNull String fileName) {
        return by(context, new File(fileName));
    }


    public static Uri by(@NotNull Context context, @NotNull File file) {
        final String authority =
                context.getApplicationContext().getPackageName() + ".fileProvider";
        return FileProvider.getUriForFile(context, authority, file);
    }

}
